(define loop_count 0)

(define (tarai x y z)
  (set! loop_count (+ loop_count 1))
  (if (< y x)
      (tarai (tarai (- x 1) y z) (tarai (- y 1) z x) (tarai (- z 1) x y))
      y))

(display (tarai 12 6 0))
(newline)
(display loop_count)
(newline)
